import time
from Base.Base import Base
from utils.data_helper import read_page_yaml


class Check(Base):
    def __init__(self, driver):
        super().__init__(driver)
        # check_config.py 中调用（假设需要 mistake_page）
        self.elem_dict = read_page_yaml('mistake_page')
        time.sleep(1)

    def dzgl(self):
        self.click(self.elem_dict['set_dzgl'])
        time.sleep(1)

    def dzcz(self):
        self.click(self.elem_dict['set_dzcz'])
        time.sleep(1)
    def kssj(self):
        self.click(self.elem_dict['set_kssj'])
        time.sleep(1)

    def ksnian(self):
        self.click(self.elem_dict['set_ksnian'])
        time.sleep(1)
    def ksyue(self):
        self.click(self.elem_dict['set_ksyue'])
        time.sleep(1)
    # def ksri(self):
    #     self.click(self.elem_dict['set_ksri'])
    #     time.sleep(1)
    def ksqd(self):
        self.click(self.elem_dict['set_ksqd'])
        time.sleep(1)
    def jssj(self):
        self.click(self.elem_dict['set_jssj'])
        time.sleep(1)
    def jsnian(self):
        self.click(self.elem_dict['set_jsnian'])
        time.sleep(1)
    def jsyue(self):
        self.click(self.elem_dict['set_jsyue'])
        time.sleep(1)
    # def jsri(self):
    #     self.click(self.elem_dict['set_jsri'])
    #     time.sleep(1)
    def jsqd(self):
        self.click(self.elem_dict['set_jsqd'])
        time.sleep(1)
    def chaxun1(self):
        self.click(self.elem_dict['set_chaxun1'])
        time.sleep(1)

    def pclb(self):
        self.click(self.elem_dict['set_pclb'])
        time.sleep(1)
    def zdsj(self):
        self.click(self.elem_dict['set_zdsj'])
        time.sleep(1)
    def djnian(self):
        self.click(self.elem_dict['set_djnian'])
        time.sleep(1)
    def djyue(self):
        self.click(self.elem_dict['set_djyue'])
        time.sleep(1)
    def djqd(self):
        self.click(self.elem_dict['set_djqd'])
        time.sleep(1)
    def chaxun2(self):
        self.click(self.elem_dict['set_chaxun2'])
        time.sleep(1)
    def hcclb(self):
        self.click(self.elem_dict['set_hcclb'])
        time.sleep(2)
    def dy1(self):
        return self.by(self.elem_dict['set_dy1'])
        time.sleep(1)
    def dy2(self):
        return self.by(self.elem_dict['set_dy2'])
        time.sleep(1)
    def dy3(self):
        return self.by(self.elem_dict['set_dy3'])
        time.sleep(1)